import { AchievementMinorCellRender } from "./AchievementMinorCellRender";
import { ProgressBase } from "../../player/ProgressBase";
//class AchievementImportantCellRender
    
    export  class AchievementImportantCellRender extends AchievementMinorCellRender
    {
        constructor()
        {
            super();
            this.reset();
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            super.data = arg1;
            this._bar.setValue(_myData.curValue, _myData.totalValue);
            if (_iconYiDaChengRight != null) 
            {
                _iconYiDaChengRight.x = 564;
            }
            return;
        }

        protected /* override */ setFinished(): void
        {
            super.setFinished();
            this._bar.visible = false;
            return;
        }

        protected /* override */ setDoing(): void
        {
            super.setDoing();
            _txtProgress.visible = false;
            this._bar.visible = true;
            return;
        }

        protected /* override */ setCanGetBonus(): void
        {
            super.setCanGetBonus();
            this._bar.visible = false;
            return;
        }

        protected /* override */ setNameDescPlaceNormal(): void
        {
            _txtName.y = 15;
            _txtDesc.y = 37;
            return;
        }

        protected /* override */ setNameDescPlaceLong(): void
        {
            _txtName.y = 8;
            _txtDesc.y = 28;
            return;
        }

        /* internal  */reset(): void
        {
            _icon.y = _icon.y + 3;
            _iconBg.y = _iconBg.y + 3;
            _txtDesc.y = _txtDesc.y + 3;
            _txtName.x = _txtName.x + 15;
            _txtDesc.x = _txtDesc.x + 15;
            _txtProgress.visible = false;
            _txtProgressStatus.x = 255;
            _txtProgressStatus.y = 14;
            _iconYiDaCheng.x = _iconYiDaCheng.x + 65;
            this._bar = new ProgressBase();
            this._bar.x = 255;
            this._bar.y = 35;
            this._bar.width = 130;
            this._bar.height = 9;
            this._bar.progressBarClass = "Mofatiao";
            this._bar.mouseChildren = false;
            this._bar.mouseEnabled = false;
            this._bar.buttonMode = false;
            this.addChild(this._bar);
            _txtCode.x = _txtCode.x + 85;
            _txtCode.y = _txtCode.y + 5;
            _bonusView.x = _bonusView.x + 10;
            _bonusView.y = _bonusView.y + 3;
            _btnGetBonus.x = _btnGetBonus.x + 70;
            _btnGetBonus.y = _btnGetBonus.y + 3;
            _btnAdd.x = _btnAdd.x + 80;
            _btnAdd.y = _btnAdd.y + 3;
            _line.width = 680;
            _line.y = _line.y + 6;
            return;
        }

        /* internal */ /* var */_bar: ProgressBase;
    }
